export default {
    data() {
        return {
            w: 0,
        }
    },
    methods: {
        $_calcTableW() {
            this.w = document.body.clientWidth - 280
        },
    },
    //操作dom在mounted
    mounted() {
        this.$_calcTableW()
        window.addEventListener('resize', this.$_calcTableW)
    },
    beforeDestory() {
        this.$_calcTableW()
        window.removeEventListener('resize', this.$_calcTableW)
    },
}